package org.example.musicserver.service.serviceImpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.example.musicserver.common.Result;
import org.example.musicserver.entity.ListSong;
import org.example.musicserver.mapper.ListSongMapper;
import org.example.musicserver.service.ListSongService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ListSongServiceImpl extends ServiceImpl<ListSongMapper, ListSong> implements ListSongService {
    @Resource
    private ListSongMapper listSongMapper;

    @Override
    public List<ListSong> listSongOfSongId(Integer playListId) {
        QueryWrapper<ListSong> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("play_list_id",playListId);
        return listSongMapper.selectList(queryWrapper);
    }


}
